package com.jinhongone.pattern.behavior.mediator;

/**
 * @author jinho
 * @className Tenant
 * @description 具体同事类角色
 * @date 2025/4/16 16:57
 */
public class Tenant extends Person {
    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    //与中介者联系
    public void contact(String msg) {
        mediator.contact(msg, this);
    }

    //获取到的消息
    public void getMsg(String msg) {
        System.out.println("租房者：" + name + ",接收到的消息：" + msg);
    }
}
